package com.yizhuoyan.his.webapi.controller.doctor.outpatient.vo;

import com.yizhuoyan.his.entity.CaseMedicalRecordEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class CaseOutpatientMedicalRecordVo {
    /**
     * 主键
     */
    private Long id;
    /**
     * 病历号
     */
    private String caseNo;
    /**
     * 挂号Id
     */
    private Long registrationId;

    /**
     * 主诉
     */
    private String readme;
    /**
     * 现病史
     */
    private String presentDetail;
    /**
     * 现病治疗情况
     */
    private String presentTreatmentDetail;
    /**
     * 既往史
     */
    private String sickHistoryDetail;
    /**
     * 过敏史
     */
    private String allergyHistoryDetail;
    /**
     * 体格检查
     */
    private String physiqueDetail;
    /**
     * 检查建议
     */
    private String proposalDetail;


    public static CaseOutpatientMedicalRecordVo of(CaseMedicalRecordEntity e) {
        if(e==null){
            return null;
        }
        CaseOutpatientMedicalRecordVo vo=new CaseOutpatientMedicalRecordVo();
        vo.setId(e.getId());
        vo.setCaseNo(e.getCaseNo());
        vo.setRegistrationId(e.getRegistrationId());
        vo.setReadme(e.getReadme());
        vo.setPresentDetail(e.getPresentDetail());
        vo.setPresentTreatmentDetail(e.getPresentTreatmentDetail());
        vo.setSickHistoryDetail(e.getSickHistoryDetail());
        vo.setAllergyHistoryDetail(e.getAllergyHistoryDetail());
        vo.setPhysiqueDetail(e.getPhysiqueDetail());
        vo.setProposalDetail(e.getProposalDetail());
        return vo;
    }
}
